
import Vue from 'vue'
import Router from 'vue-router'
import login from "../views/login"
import layout from "@/layout"
Vue.use(Router)
export const routes = [
  {
    path: "/login",
    component: login
  },


]
export const layouts = [
  {
    path: "/",
    name: "/",
    redirect: "/index",
    component: layout,
    meta: { title: "首页", icon: "" },
    children: [
      {
        path: "/sports/console",
        name: "venue_manage",
        meta: { title: "工作台", icon: "" },
        component: () => import("@/views/console_manage"),
      },
    ]
  },
]
export const defaultRouter = [
  // {
  //   path: "/sports/venue_manage",
  //   name: "venue_manage",
  //   meta: { title: "场馆列表", icon: "" },
  //   component: () => import("@/views/venue_manage"),
  //   children: [
  //     {
  //       path: "/sports/venue_manage_list",
  //       name: "venue_manage_list",
  //       meta: { title: "场馆列表", icon: "" },
  //       component: () => import("@/views/venue_manage/list"),
  //     },
  //   ]
  // },

  {
    path: "/sports/field_manage",
    name: "venue_manage",
    meta: { title: "场地管理", icon: "" },
    component: () => import("@/views/field_manage"),
    children: [
      {
        path: "/sports/field_item",
        name: "field_item",
        meta: { title: "场地场区", icon: "" },
        component: () => import("@/views/field_manage/field_item"),
      },
      {
        path: "/sports/field_price",
        name: "field_price",
        meta: { title: "场地定价", icon: "" },
        children: [

        ],
        component: () => import("@/views/field_manage/field_price"),
      },
      {
        path: "/sports/setting",
        name: "setting",
        meta: { title: "场地定价", icon: "", state: true },
        component: () => import("@/views/field_manage/field_price/setting"),
      },
      {
        path: "/sports/programme",
        name: "setting",
        meta: { title: "定价方案", icon: "", },
        component: () => import("@/views/field_manage/programme/"),
      },
      {
        path: "/sports/programmeadd",
        name: "setting",
        meta: { title: "定价设置", icon: "", state: true },
        component: () => import("@/views/field_manage/programme/add"),
      },
      {
        path: "/sports/field_list",
        name: "field_list",
        meta: { title: "项目列表", icon: "" },
        component: () => import("@/views/field_manage/field_list"),
      },
      {
        path: "/sports/field_serve",
        name: "field_serve",
        meta: { title: "服务管理", icon: "" },
        component: () => import("@/views/field_manage/field_serve"),
      },
    ]
  },
  {
    path: "/sports/venueSales",
    name: "venueSales",
    meta: { title: "充值预定", icon: "" },
    component: () => import("@/views/venue_sales"),
    children: [
      {
        path: "/sports/reserve",
        name: "reserve",
        meta: { title: "场地预定", icon: "" },
        component: () => import("@/views/venue_sales/reserve"),

      },
      {
        path: "/sports/reserve/add",
        name: "reserveAdd",
        meta: { title: "提交预定", icon: "", state: true },
        component: () => import("@/views/venue_sales/reserve/add"),
      },
      {
        path: "/sports/order",
        name: "order",
        meta: { title: "订场订单", icon: "" },
        component: () => import("@/views/venue_sales/order"),
      },
      // {
      //   path: "/sports/card",
      //   name: "card",
      //   meta: { title: "开卡充值", icon: "" },
      //   component: () => import("@/views/venue_sales/card"),
      // },
      {
        path: "/sports/rechargeConfig",
        name: "card",
        meta: { title: "充值配置", icon: "" },
        component: () => import("@/views/venue_sales/rechargeConfig"),
      },
      {
        path: "/sports/rechargeOrder",
        name: "card",
        meta: { title: "充值订单", icon: "" },
        component: () => import("@/views/venue_sales/rechargeOrder"),
      },
      {
        path: "/sports/cardOrder",
        name: "card",
        meta: { title: "次卡订单", icon: "" },
        component: () => import("@/views/venue_sales/cardOrder"),
      },
      {
       path: "/sports/cwkOrder",
       name: "card",
       meta: { title: "畅玩卡订单", icon: "" },
       component: () => import("@/views/venue_sales/cwkOrder"),
     },
    ]
  },
  {
    path: "/sports/member_manage",
    name: "member_manage",
    meta: { title: "会员管理", icon: "" },
    component: () => import("@/views/member_manage"),
    children: [
      {
        path: "/sports/member_list",
        name: "list",
        meta: { title: "会员列表", icon: "" },
        component: () => import("@/views/member_manage/list"),
      },
      {
        path: "/sports/userInfo",
        name: "userInfo",
        meta: { title: "会员详细信息", icon: "", state: true },
        component: () => import("@/views/member_manage/userInfo"),
      },
      {
        path: '/sports/giftCard',
        name: "giftCard",
        meta: { title: "礼品卡管理", icon: "" },
        component: () => import("@/views/member_manage/giftCard"),
      },
      {
        path: '/sports/card',
        name: "card",
        meta: { title: "次卡管理", icon: "" },
        component: () => import("@/views/member_manage/card"),
      },
      {
       path: '/sports/cwk',
       name: "cwk",
       meta: { title: "畅玩卡管理", icon: "" },
       component: () => import("@/views/member_manage/cwk"),
     },
     {
      path: '/sports/cwklist',
      name: "cwklist",
      meta: { title: "畅玩卡列表", icon: "" },
      component: () => import("@/views/member_manage/cwklist"),
    }
    ]
  },
  {
    path: "/sports/memberCard_manage",
    name: "memberCard_manage",
    meta: { title: "会员等级管理", icon: "" },
    component: () => import("@/views/memberCard_manage"),
    children: [
      {
        path: "/sports/memberCard_manage_list",
        name: "list",
        meta: { title: "会员等级管理", icon: "" },
        component: () => import("@/views/memberCard_manage/list"),
      },
      {
        path: "/sports/memberCard_detail",
        name: "list",
        meta: { title: "会员卡编辑", icon: "", state: true },
        component: () => import("@/views/memberCard_manage/detail"),
      },
    ]
  },
  {
    path: "/sports/ad_manage",
    name: "ad_manage",
    meta: { title: "广告位管理", icon: "" },
    component: () => import("@/views/ad_manage"),
    children: [
      {
        path: "/sports/ad_manage_list",
        name: "list",
        meta: { title: "广告位列表", icon: "" },
        component: () => import("@/views/ad_manage/list"),
      },
      {
        path: "/sports/competition",
        name: "list",
        meta: { title: "赛事管理", icon: "" },
        component: () => import("@/views/ad_manage/competition"),
       
      },
      {
        path: "/sports/addCompetition",
        name: "list",
        meta: { title: "赛事新增/编辑", icon: "",state: true },
        component: () => import("@/views/ad_manage/competition/addCompetition"),
        
      },
      {
        path: "/sports/appluList",
        name: "list",
        meta: { title: "报名人列表", icon: "",},
        component: () => import("@/views/ad_manage/competition/applyList"),
        
      },
      {
        path: "/sports/appluShow",
        name: "list",
        meta: { title: "报名表", icon: "",state: true },
        component: () => import("@/views/ad_manage/competition/applyShow"),
        
      },
      {
        path: "/sports/rule",
        name: "list",
        meta: { title: "报名规则", icon: "",state: true },
        component: () => import("@/views/ad_manage/competition/rule"),
        
      },
     
    ]
  },
  {
    path: "/sports/finance_manage",
    name: "finance_manage",
    meta: { title: "财务统计", icon: "" },
    component: () => import("@/views/finance_manage"),

  },
  {
    path: "/sports/dataStatistics",
    name: "dataStatistics",
    meta: { title: "数据统计", icon: "" },
    component: () => import("@/views/dataStatistics"),
    children: [
      {
        path: "/sports/dataStatistics/cardWriteOff",
        name: "cardWriteOff",
        meta: { title: "卡售卖统计", icon: "" },
        component: () => import("@/views/dataStatistics/cardWriteOff"),
      },
      {
        path: "/sports/dataStatistics/cardSell",
        name: "cardSell",
        meta: { title: "卡核销统计", icon: "" },
        component: () => import("@/views/dataStatistics/cardSell"),
      },
    ]

  },
  {
    path: "/sports/propelling",
    name: "propelling",
    meta: { title: "推送管理", icon: "" },
    component: () => import("@/views/propelling"),
    children: [
      {
        path: "/sports/propelling/readPack",
        name: "readPack",
        meta: { title: "红包推送", icon: "" },
        component: () => import("@/views/propelling/readPack"),
      },
      {
        path: "/sports/propelling/cardPack",
        name: "cardPack",
        meta: { title: "次卡推送", icon: "" },
        component: () => import("@/views/propelling/cardPack"),
      },
      {
        path: "/sports/propelling/pushHistory",
        name: "pushHistory",
        meta: { title: "推送记录", icon: "" },
        component: () => import("@/views/propelling/pushHistory"),
      },
    ]

  },
  {
    path: "/sports/release",
    name: "release",
    meta: { title: "版本管理", icon: "" },
    component: () => import("@/views/release"),

  },


]
const router = new Router({
  routes
})



export default router
